package com.ssm.admin.service.impl;

import com.ssm.admin.entity.dto.SaleOrderDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ssm.common.utils.PageUtils;
import com.ssm.common.utils.Query;

import com.ssm.admin.dao.SsmSodetailsDao;
import com.ssm.admin.entity.SsmSodetailsEntity;
import com.ssm.admin.service.SsmSodetailsService;


@Service("ssmSodetailsService")
public class SsmSodetailsServiceImpl extends ServiceImpl<SsmSodetailsDao, SsmSodetailsEntity> implements SsmSodetailsService {

    @Autowired
    private SsmSodetailsDao ssmSodetailsDao;
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<SsmSodetailsEntity> page = this.page(
                new Query<SsmSodetailsEntity>().getPage(params),
                new QueryWrapper<SsmSodetailsEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<SaleOrderDto> findOrderInfoById(Integer id) {
        return ssmSodetailsDao.findOrderInfoById(id);
    }

}